import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';

import 'package:get/get.dart';
import 'package:smart_translator/app/style/widget_style.dart';

import '../controllers/landscape_direct_trans_controller.dart';

class LandscapeDirectTransView extends GetView<LandscapeDirectTransController> {
  const LandscapeDirectTransView({super.key});
  @override
  Widget build(BuildContext context) {

    return Scaffold(
      body: Obx(()=>Container(
        width: controller.screenHeight.value,
        child: Stack(
          children: [
            Column(
              mainAxisAlignment: MainAxisAlignment.spaceBetween,
              crossAxisAlignment: CrossAxisAlignment.start,
              children: [
                Expanded(child: Container(
                  margin: EdgeInsets.only(left: 52.w,right: 52.w,top: 120.h,bottom: 10.h),
                  child: SingleChildScrollView(
                    controller: controller.firstScrollController,
                    child: Text(controller.audioService.indexPageFinalToLanguage.value !=''?controller.audioService.indexPageFinalToLanguage.value:'暂无数据',style: TextStyle(
                        fontSize: 28.sp),
                    ),
                  ),
                ),flex: 5,),
                Expanded(child: Container(
                  margin: EdgeInsets.only(left: 52.w,right: 52.w),
                  child: SingleChildScrollView(
                    controller: controller.secondScrollController,
                    child: Text(controller.audioService.indexPageFinalFromLanguage.value,style: AppStyleThemeData.linkStyle,),
                  ),
                ),flex: 1,),
                SizedBox(
                  height: 36.h,
                )
              ],
            ),
            Positioned(
              child: InkWell(
                onTap: () {
                  Get.back();
                },
                child: Image.asset('assets/images/landscape_close_btn.png',width: 25.w,height: 25.h,),
              ),
              right: 15.w,
              top: 35.h,
            )
          ],
        ),
      )),
    );
  }
}
